package com.snimay.app.role.vo;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.snimay.heibernate.Annotation.table;

/**   
 * @Title      : Role.java
 * @Package    : com.snimay.users.vo
 * @Description: TODO 
 * @author     : xxy
 * @date       : 2018年4月27日 下午5:36:50
 * @version    : V1.0   
 */
@Entity
@Table(name = "SYS_Role")
@table(query = "id", name = "角色",size=10)
public class Role {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
 
	
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)  
	@JoinColumn(insertable=true,updatable=true,name="role")
	private Set<RoleMenu> menus;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Set<RoleMenu> getMenus() {
		return menus;
	}

	public void setMenus(Set<RoleMenu> menus) {
		this.menus = menus;
	}

	private String rolename;
	private String remarks;
	

	
}
